package pct.search;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import pct.manage.StatusManager;


import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class IncludeResult extends ActionSupport implements SessionAware {
	private Map<String, Object> session;

	public String execute() {
		// do nothing but include corresponding result
		StatusManager sm = (StatusManager) session.get("status");
		switch (sm.getPageType()) {
		case 4:
			return "GROUP";
		case 5:
			return "TOPIC";
		case 6:
			return "POST";
		case 7:
			return "DISEASE";
		default:
			return INPUT;
		}
	}

	@Override
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}

}
